import Vue from 'vue'
import Router from 'vue-router'
import Index from '@/pages/index'
import Home from '@/pages/home'
import Listcate from '@/pages/listcate'
import Search from '@/pages/search'
import Ucenter from '@/pages/ucenter'
import Artists from '@/pages/artists'
import HotList from '@/pages/musiclist/hot_list'
import KingList from '@/pages/musiclist/king_list'
import NewsList from '@/pages/musiclist/news_list'
import MoreList from '@/pages/morelist'
import MusicPlay from '@/pages/musicplay'
import ArtistsDetails from '@/pages/artistsDetails/artistsDetails'

Vue.use(Router)

export default new Router({
  linkActiveClass:'active',
  routes: [
    {
      path:'/musicplay',
      name:'musicplay',
      component:MusicPlay
    },
    {
      path: '/',
      name: 'index',
      redirect:'/home',
      component: Index,
      children:[
        {
          path:'home',
          component:Home,
          redirect:'/home/hotlist',
          children:[
            {
              path:'hotlist',
              component:HotList
            },
            {
              path:'kinglist',
              component:KingList
            },
            {
              path:'newslist',
              component:NewsList
            }
          ]
        },
        {
          path:'listcate',
          component:Listcate
        },
        {
          path:'search',
          component:Search
        },
        {
          path:'ucenter',
          component:Ucenter
        },
        {
          path:'artists',
          component:Artists
        },
        {
          path:'morelist',
          name:'morelist',
          component:MoreList
        },
        {
          path:'artistsdetails',
          name:'artistsDetails',
          component:ArtistsDetails
        }
      ]
    }
  ]
})
